arr = [49, 38, 65, 97, 76, 13, 27, 50]
arr1 =[56, 23, 82, 45, 76, 69, 20, 45, 93, 16, 27]

def quick_sort(arr,start,end):
    center = None
    low = start
    high = end
    center_num = arr[low]
    arr[low] = None
    while low < high:
        if arr[low] == None:
            if arr[high] < center_num:
                arr[low] = arr[high]
                arr[high] = None
            else:
                high -= 1
        elif arr[high] == None:
            if arr[low] > center_num:
                arr[high] = arr[low]
                arr[low] = None
            else:
                low += 1
    if arr[low] == None:
        arr[low] = center_num
        center = low
    if arr[high] == None:
        arr[high] = center_num
        center = high
    if center-1 > start:
        quick_sort(arr,  start, center-1)

    if center+1 < end:
        quick_sort(arr, center+1, end)




quick_sort(arr1,0,len(arr1)-1)

print(arr1)






